package nl.hr.minor.mobilelife.j1213.jlr.findit;

import nl.hr.minor.mobilelife.j1213.jlr.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

/**
 * Activity to display the menu of the FindIT game.
 * @author Leon
 *
 */
public class Menu extends Activity implements View.OnClickListener {
	
	private Button playButton;
	private Button highScoreButton;
	private Button helpButton;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.findit_menu);
		initVars();
	}
	
	/**
	 * Called from onCreate to initialize all buttons
	 */
	public void initVars(){
		playButton = (Button) findViewById(R.id.buttonOne);
		playButton.setOnClickListener(this);
		highScoreButton = (Button) findViewById(R.id.buttonTwo);
		highScoreButton.setOnClickListener(this);
		helpButton = (Button) findViewById(R.id.buttonThree);
		helpButton.setOnClickListener(this);
	}
	
	@Override
	public void onClick(View view) {
		Intent intent;
		switch(view.getId()){
			case R.id.buttonOne:
				intent = new Intent(this, SearchDifferenceOne.class);
				startActivity(intent);
				break;
			case R.id.buttonTwo:
				intent = new Intent(this, HighScores.class);
				startActivity(intent);
				break;
			case R.id.buttonThree:
				intent = new Intent(this, Instructies.class);
				startActivity(intent);
				break;
		}
		
	}
}